home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
LOGIC Apps
/
Logic-APPLE_II_APPS.iso
/
mac
/
LOGIC Apple II 5.25" Library - ProDOS 8
/
P8C004.dsk
/
KERMIT.SETUP.bas
< prev
next >
Wrap
BASIC Source File
|
2012-02-16
|
5KB
|
99 lines
10 REM KERMIT 3.86 INIT FILE SETUP - LES FERCH - UBC
20 D$ = CHR$(4):G$ = CHR$(7)
30 DOS = PEEK(43624) = 1 OR PEEK(43624) = 2
40 Y$ = "Y" + CHR$(8):N$ = "N" + CHR$(8)
50 HOME : PRINT "THIS PROGRAM CREATES A FILE CALLED"
60 PRINT "'KERMIT.INIT' CONTAINING A SET OF"
70 PRINT "COMMANDS TO CONFIGURE KERMIT TO SUIT"
80 PRINT "YOUR EQUIPMENT AND PREFERENCES.": POKE 34,5
90 GOSUB 700: GOSUB 730
100 HOME : PRINT "CHANGE ESCAPE CHARACTER TO ESC? ";Y$;
110 Y = 1: GOSUB 760
120 IF R THEN GOSUB 740: PRINT "SET ESCAPE 1B": GOSUB 730
130 PRINT "XON/XOFF FLOW CONTROL? ";N$;:Y = 0: GOSUB 760
140 IF R THEN GOSUB 740: PRINT "SET FLOW XON": GOSUB 730
150 PRINT : PRINT "TYPE OF TERMINAL EMULATION"
160 A$(1) = "VT52":A$(2) = "VT100":A$(3) = "NONE":A$(4) = "MONITOR"
170 U = 4:V = 2:W$ = "TERMINAL": GOSUB 890: GOSUB 820
180 GOSUB 740: PRINT "SET TERMINAL ";A$(S): GOSUB 730
190 IF S < >2 THEN PRINT : GOTO 270
200 PRINT : PRINT "VT100 CURSOR KEYS? ";Y$;:Y = 1: GOSUB 760
210 IF R THEN GOSUB 740: PRINT "SET CURSOR-KEYS-VT100 ON": GOSUB 730
220 PRINT "HAVE A NUMERIC KEYPAD? ";N$;:Y = 0: GOSUB 760
230 IF NOT R THEN GOTO 260
240 GOSUB 740: PRINT "SET KEYPAD ON"
250 PRINT "SET APPLICATION-MODE ON": GOSUB 730
260 PRINT "DELETE SENDS CTRL-H INSTEAD OF DEL? ";N$;:Y = 0: GOSUB 760
270 IF R THEN GOSUB 740: PRINT "SET SWAP ON": GOSUB 730
280 PRINT : PRINT "DEFAULT TYPE OF FILE TRANSFER"
290 A$(1) = "APPLESOFT":A$(2) = "BINARY"
300 A$(3) = "INTEGER":A$(4) = "TEXT"
310 U = 4:V = 4:W$ = "TYPE": GOSUB 890: GOSUB 820
320 GOSUB 740: PRINT "SET FILE-TYPE ";A$(S): GOSUB 730
321 PRINT : PRINT "PARITY:"
323 A$(1) = "NONE":A$(2) = "EVEN":A$(3) = "ODD":A$(4) = "MARK"
325 A$(5) = "SPACE"
327 U = 5:V = 1:W$ = "TYPE": GOSUB 890: GOSUB 820
329 GOSUB 740: PRINT "SET PARITY ";A$(S): GOSUB 730
330 PRINT : PRINT "DEFAULT TRANSFER PROTOCOL"
340 A$(1) = "KERMIT":A$(2) = "XMODEM"
350 U = 2:V = 1:W$ = "PROTOCOL": GOSUB 890: GOSUB 820
360 GOSUB 740: IF S = 1 THEN 370
362 PRINT "SET SEND CR<->CR,LF OFF"
364 PRINT "SET REC CR<->CR,LF OFF"
370 PRINT "SET PROTOCOL ";A$(S): GOSUB 730
380 PRINT : PRINT "MODEM IN SLOT 2? ";Y$;:Y = 1: GOSUB 760
390 IF R THEN M = 2: GOTO 410
400 U = 7:V = 1:W$ = "SLOT": GOSUB 820:M = S
410 GOSUB 740: PRINT "SET SLOT ";M: GOSUB 730
420 PRINT : PRINT "PRINTER IN SLOT 1? ";Y$;:Y = 1: GOSUB 760
430 IF R THEN M = 1: GOTO 450
440 U = 7:V = 2:W$ = "SLOT": GOSUB 820:M = S
450 GOSUB 740: PRINT "SET PRINTER SLOT ";M: GOSUB 730
460 PRINT : PRINT "MODEM SPEED:"
470 A$(1) = "300":A$(2) = "600":A$(3) = "1200":A$(4) = "2400"
480 A$(5) = "4800":A$(6) = "9600":A$(7) = "19200"
490 U = 7:V = 3:W$ = "SPEED": GOSUB 890: GOSUB 820
500 GOSUB 740: PRINT "SET BAUD ";A$(S): GOSUB 730
510 IF PEEK(64435) < >6 THEN GOTO 540
520 GOSUB 740: PRINT "SET KEYBOARD 2E": GOSUB 730
530 GOTO 580: REM IIE/IIC/IIGS
540 PRINT : PRINT "KEYBOARD LOWER CASE? ";N$;:Y = 0: GOSUB 760
550 IF R THEN GOSUB 740: PRINT "SET KEYBOARD 2E": GOSUB 730
560 PRINT "DISPLAY LOWER CASE? ";N$;:Y = 0: GOSUB 760
570 IF R THEN GOSUB 740: PRINT "SET DISPLAY 2E-40": GOSUB 730
580 PRINT : PRINT "80 COLUMN DISPLAY? ";Y$;:Y = 1: GOSUB 760
590 IF NOT R GOTO 640
600 D3 = 3: PRINT "IN SLOT 3? ";Y$;:Y = 1: GOSUB 760
610 IF R GOTO 630
620 U = 7:V = 4:W$ = "SLOT": GOSUB 820:D3 = S
630 GOSUB 740: PRINT "SET DISPLAY 80-COL ";D3: GOSUB 730
640 GOSUB 740: PRINT "?";: IF DOS THEN PRINT
650 GOSUB 730
660 PRINT : PRINT "CHANGE SOMETHING? ";N$;:Y = 0: GOSUB 760
670 IF R GOTO 90
680 POKE 34,0: GOTO 910
690 PRINT "KERMIT INSTALL ABORTED": GOTO 910
700 PRINT D$;"OPEN KERMIT.INIT": PRINT D$;"CLOSE"
710 PRINT D$;"DELETE KERMIT.INIT"
720 PRINT D$;"OPEN KERMIT.INIT": PRINT D$;"WRITE KERMIT.INIT": RETURN
730 PRINT D$;"CLOSE KERMIT.INIT": RETURN
740 PRINT D$;"APPEND KERMIT.INIT"
750 PRINT D$;"WRITE KERMIT.INIT": RETURN
760 GET R$:S = ASC(R$):R = (S = 89) OR (S = 121) OR ((S = 13) AND Y)
770 W = (S = 78) OR (S = 110) OR ((S = 13) AND NOT Y):E = (S = 27)
780 IF NOT (R OR W OR E) THEN 760
790 PRINT R$: IF S < >13 THEN PRINT
800 IF E THEN 690
810 RETURN
820 PRINT "WHICH ";W$;"? (1 - ";
830 PRINT CHR$(U +48);") "; CHR$(V +48); CHR$(8);
840 GET R$:S = ASC(R$) -48:E = (S = -21)
850 IF NOT E AND (S < > -35) AND (S <1 OR S >U) THEN 840
860 IF S = -35 THEN S = V:R$ = CHR$(S +48)
870 PRINT R$: PRINT : IF E THEN 690
880 RETURN
890 PRINT : FOR I = 1 TO U: PRINT CHR$(I +48);" ";A$(I): NEXT
900 PRINT : RETURN
910 IF DOS THEN END
920 PRINT D$;"BYE"